Skip to content

feat: Enhance image manipulation capabilities and add tests#1

Closed
JacobBorden wants to merge 1 commit intodevelopmentfrom
feature/image-processing-enhancements
Closed

feat: Enhance image manipulation capabilities and add tests#1
JacobBorden wants to merge 1 commit intodevelopmentfrom
feature/image-processing-enhancements

Conversation

@JacobBorden
Copy link
Owner

This commit introduces several enhancements to the bitmap image processing library:

Added:

  • New image manipulation functions:
    • Invert Colors: Inverts the RGB values of each pixel.
    • Sepia Tone: Applies a classic sepia filter.
    • Box Blur: Applies a configurable box blur effect.
  • Comprehensive unit testing framework (tests/test_bitmap.cpp) using CMake/CTest.
  • Unit tests covering:
    • Pixel-level operations (Greyscale, Invert, Sepia, Brightness, Contrast, Saturation, Luminance, including color-specific variants).
    • Image-level operations (BoxBlur, Shrink, Rotate, and basic validity checks for others).
  • README.md: Details project features, dependencies, build instructions, and basic usage.
  • CHANGELOG.md: Tracks changes, starting with this set of enhancements as v0.1.0.

Changed:

  • Refined contrast adjustment logic for secondary colors (Magenta, Yellow, Cyan) to apply contrast directly to their constituent primary color channels for more predictable results.
  • Significantly improved inline code documentation in src/bitmap.h and src/bitmap.cpp for all functions, enhancing clarity on purpose, parameters, and logic.
  • Standardized clamping of pixel color components to the 0-255 range across various functions.
  • Refactored main.cpp to serve as a clearer demonstration of library features, including new functions and better error handling for file operations.

Fixed:

  • Corrected syntax errors in the original implementations of ChangePixelContrastMagenta and ChangePixelContrastCyan.
  • Addressed incorrect variable usage (e.g., magenta vs cyan) in ChangePixelContrastCyan.
  • Corrected std::min usage in several saturation and luminance functions.
  • Improved GDI resource management in ScreenShotWindow by ensuring proper cleanup of device contexts and bitmap handles.
  • Corrected minor typos in function parameter names and conditional logic in some pixel manipulation functions.

This commit introduces several enhancements to the bitmap image processing library:

Added:
- New image manipulation functions:
    - Invert Colors: Inverts the RGB values of each pixel.
    - Sepia Tone: Applies a classic sepia filter.
    - Box Blur: Applies a configurable box blur effect.
- Comprehensive unit testing framework (`tests/test_bitmap.cpp`) using CMake/CTest.
- Unit tests covering:
    - Pixel-level operations (Greyscale, Invert, Sepia, Brightness, Contrast, Saturation, Luminance, including color-specific variants).
    - Image-level operations (BoxBlur, Shrink, Rotate, and basic validity checks for others).
- `README.md`: Details project features, dependencies, build instructions, and basic usage.
- `CHANGELOG.md`: Tracks changes, starting with this set of enhancements as v0.1.0.

Changed:
- Refined contrast adjustment logic for secondary colors (Magenta, Yellow, Cyan) to apply contrast directly to their constituent primary color channels for more predictable results.
- Significantly improved inline code documentation in `src/bitmap.h` and `src/bitmap.cpp` for all functions, enhancing clarity on purpose, parameters, and logic.
- Standardized clamping of pixel color components to the 0-255 range across various functions.
- Refactored `main.cpp` to serve as a clearer demonstration of library features, including new functions and better error handling for file operations.

Fixed:
- Corrected syntax errors in the original implementations of `ChangePixelContrastMagenta` and `ChangePixelContrastCyan`.
- Addressed incorrect variable usage (e.g., `magenta` vs `cyan`) in `ChangePixelContrastCyan`.
- Corrected `std::min` usage in several saturation and luminance functions.
- Improved GDI resource management in `ScreenShotWindow` by ensuring proper cleanup of device contexts and bitmap handles.
- Corrected minor typos in function parameter names and conditional logic in some pixel manipulation functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant